package org.small.shop.phone.api.utils.string;

import java.util.List;

public class ObjectEmptyUtils {

	public static boolean isNotEmptyString(String str) {

		return (str != null && str.trim().length() > 0) ? true : false;
	}

	public static boolean isEmptyString(String str) {

		return (str != null && str.trim().length() > 0) ? false : true;
	}

	public static boolean isNumeric(String str) {

		return (isNotEmptyString(str) && str.matches("^[0-9]*$")) ? true : false;
	}

	public static boolean isEmptyList(List<?> temp) {

		return (temp == null || temp.size() == 0) ? true : false;
	}

	public static boolean isNotEmptyList(List<Object> temp) {

		return (temp == null || temp.size() == 0) ? false : true;
	}

	public static boolean isNotEmpty(Object obj) {

		return obj != null ? true : false;
	}
	
	public static boolean isEmptyArray(Object[] obj) {

		return (obj == null || obj.length == 0) ? true : false;
	}
}
